package com.lzq.badminton.enums;

public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200,"操作成功"),
    // 登录
    NEED_LOGIN(401,"需要登录后操作"),
    NO_OPERATOR_AUTH(403,"无权限操作"),
    SYSTEM_ERROR(500,"出现错误"),
    USERNAME_EXIST(501,"用户名已存在"),
    PHONENUMBER_EXIST(502,"手机号已存在"), EMAIL_EXIST(503, "邮箱已存在"),
    REQUIRE_USERNAME(504, "必需填写用户名"),
    CONTENT_NOT_NULL(506, "评论内容不能为空"),
    FILE_TYPE_ERROR(507, "文件类型错误，请上传png文件"),
    USERNAME_NOT_NULL(508, "用户名不能为空"),
    NICKNAME_NOT_NULL(509, "昵称不能为空"),
    PASSWORD_NOT_NULL(510, "密码不能为空"),
    EMAIL_NOT_NULL(511, "邮箱不能为空"),
    NICKNAME_EXIST(512, "昵称已存在"),
    LOGIN_ERROR(505,"登录失败"),
    WXCODE_LOSS(701, "code丢失"),
    WXLOGIN_METHOD_ERROR(702, "登录请求方法错误"),
    WXLOGIN_CONTENTTYPE_ERROR(703, "登录请求内容类型错误"),
    WXNAME_LOSS(704, "登录缺少用户名"),
    INSERT_ERROR(301, "数据插入失败"),
    REMOVE_ERROR(302, "数据删除失败"),
    BOOKING_ERROR(303, "预约场地失败"),
    ORDER_PAYD(304, "该订单已支付"),
    ORDER_NO_FOUND(305, "订单不存在"),
    ORDER_STATUS_ERROR(306, "订单状态错误，无法退款"),
    TOKEN_ERROR(405, "accessToken失效!"),
    R_TOKEN_ERROR(406, "refreshToken过期!"),
    ORENA_STATE(307, "球馆状态更新失败!"),
    ARENA_DELETE(308, "球馆删除失败!"),
    ARENA_EDIT(309, "球馆编辑失败!"),
    USER_NOT_EXIT(513, "用户不存在"),
    TARGET_USER_NOT_EXIT(514, "目标用户不存");
    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}

